package leetCode.secondWeek;

public class Code_69 {
    public int mySqrt(int x) {
        for (int i = 0; i < Math.sqrt(Integer.MAX_VALUE); i++) {
            if (x < Math.pow(i, 2)) {
                return i - 1;
            }
        }
        return (int) Math.sqrt(Integer.MAX_VALUE);
    }
}
